package com.majsubtense.core.events;

import javafx.scene.input.KeyEvent;

public class KeyboardEvent extends InputEvent {
    public static final EventType<KeyboardEvent> ANY;
    public static final EventType<KeyboardEvent> KEYBOARD_PRESSED;
    public static final EventType<KeyboardEvent> KEYBOARD_RELEASED;
    private final javafx.scene.input.KeyEvent nativeEvent;

    public KeyboardEvent(EventType<? extends Event> eventType, javafx.scene.input.KeyEvent nativeEvent) {
        super(eventType);
        this.nativeEvent = nativeEvent;
    }

    public KeyEvent getNativeEvent() {
        return nativeEvent;
    }

    static {
        ANY                 = new EventType<>(InputEvent.ANY, "KEYBOARD_ANY");
        KEYBOARD_PRESSED    = new EventType<>(KeyboardEvent.ANY, "KEYBOARD_PRESSED");
        KEYBOARD_RELEASED   = new EventType<>(KeyboardEvent.ANY, "KEYBOARD_RELEASED");
    }
}
